<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>乐淘</title>
  <link rel="stylesheet" href="./lib/bootstrap/css/bootstrap.css">
  <link rel="stylesheet" href="./lib/bootstrap-validator/css/bootstrapValidator.css">
  <link rel="stylesheet" href="./lib/nprogress/nprogress.css">
  <link rel="stylesheet" href="./css/common.css">
</head>
<body>
   <!-- 首页页面布局 -->
   <!-- 分为侧边导航栏，和主体部分 -->
   <div class="aside-nav bg-color transition">
      <div class="title">
        <h3>乐淘-54</h3>
      </div>
       <div class="icon">
         <img src="./images/default.png" alt="">
         <h4>超级管理员</h4>
       </div>
       <div class="nav">
          <a href="./user.html"><i class="glyphicon glyphicon-user"></i>用户管理 </a>
          <div>
            <a href="javascript:" class="cate"><i class="glyphicon glyphicon-list"></i>分类管理</a>
           <div class="pd-l" id="cate">
              <a href="./cate1.html" class="current">一级分类</a>
              <a href="./cate2.html">二级分类</a>
           </div>
          </div>
          <a href="./products.html"> <i class="glyphicon glyphicon-th"></i>商品管理</a>
       </div>
   </div>

   <div class="main transition pad-left">
     <div class="header">
       <a href="#"class="transition menu"><i class=" glyphicon glyphicon-align-justify pull-left"></i></a>
       <button type="button" id="btn-out" class="btn pull-right" data-toggle="modal" data-target=".bs-example-modal-sm">
        <i class=" glyphicon glyphicon-log-out"></i>
      </button>
     </div>
      <div class="body">
        <!-- 路径导航 -->
        <ol class="breadcrumb">
            <li><a href="./index.html">管理系统</a></li>
            <li class="active">分类管理</li>
            <li class="active">一级分类</li>
          </ol>
          <!-- 添加分类按钮 -->
          <button class="btn btn-default mb-20" data-toggle="modal" data-target=".add-modal">添加分类</button>
          <!-- 数据表格 -->
          <table class="table table-bordered table-hover text-center">
            <thead>
              <tr>
                <th>序号</th>
                <th>一级分类名</th>
              </tr>
            </thead>
            <tbody></tbody>
          </table>
          <!-- 分页容器 -->
          <div class="pull-right">
            	<ul id="paginator"></ul>
          </div>
      </div>
   </div>
    <!-- 退出功能模态框 -->
    <div id="modal-out" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel"
    aria-hidden="true">
    <div class="modal-dialog modal-sm">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <p class="modal-title tit" id="myModalLabel">温馨提示</p>
        </div>
        <div class="modal-body info">
          您确定要退出后台管理系统吗？
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
          <button type="button" class="btn btn-primary btn-out">退出</button>
        </div>
      </div>
    </div>
  </div>
  <!-- 添加分类功能 模态框 -->
  <div id="modal-add" class="modal fade add-modal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel"
    aria-hidden="true">
    <div class="modal-dialog modal-sm">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <p class="modal-title tit" id="myModalLabel">添加一级分类</p>
        </div>
        <div class="modal-body info">
            <form class="" id="add-form">
                <!-- 表单组 -->
                <div class="form-group">
                  <input type="text" class="form-control" name="categoryName" placeholder="请输入一级分类">
                </div>
              </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
          <!-- h5新增的form属性，可以指定 表单 所属的表单域 将表单域外面的表单和表单域关联起来 -->
          <!-- 提交表单的数据，必须是submit -->
          <button type="submit" class="btn btn-primary btn-add" form="add-form">添加</button>
        </div>
      </div>
    </div>
  </div>

  <!-- 准备模板 -->
  <script type="text/html" id="tmp">
    {{each rows v i}}
      <tr>
        <td>{{(page-1)*size + i+1}}</td>
        <td>{{v.categoryName}}</td>
      </tr>
    {{/each}}
  </script>
   <script src="./lib/jquery/jquery.js"></script>
   <script src="./lib/bootstrap/js/bootstrap.js"></script>
   <script src="./lib/bootstrap-validator/js/bootstrapValidator.js"></script>
   <script src="./lib/bootstrap-paginator/bootstrap-paginator.min.js"></script>
   <script src="./lib/nprogress/nprogress.js"></script>
   <script src="./lib/artTemplate/template-web.js"></script>
   <script src="./js/common.js"></script>
    <script src="./js/category1.js"></script>
</body>
</html>